﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Admin.Master" AutoEventWireup="true" CodeBehind="ManageDocuments.aspx.cs" Inherits="MetadataBasedConfigArch.Web.Admin.ManageDocuments" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <asp:LinkButton ID="AddLinkButton" CssClass="addbutton" runat="server" 
        onclick="AddLinkButton_Click">Add Document</asp:LinkButton> 
    <div id="ShowPanel" runat="server">
        <div class="datagridcontainer">
            <asp:GridView ID="MainGridView" runat="server" AutoGenerateColumns="false"  
                onrowdatabound="MainGridView_RowDataBound" 
                onrowcommand="MainGridView_RowCommand">
                <Columns>
                    <asp:BoundField  HeaderText="Name" DataField="Name"/>
                    <asp:TemplateField HeaderText="View">
                        <ItemTemplate>
                            <asp:HyperLink ID="DocumentHyperLink" runat="server">Open</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>  
                    <asp:TemplateField HeaderText="Edit">
                        <ItemTemplate> 
                            <asp:Button ID="EditButton" runat="server" Text="Edit"  CommandName="EditD"/>
                            <asp:Button ID="DeleteButton" runat="server" Text="Delete"  CommandName="Delete"/>
                        </ItemTemplate>
                    </asp:TemplateField> 
                </Columns>
            </asp:GridView> 
        </div>
    </div>
    <div id="EditPanel" runat="server" visible="false">
        <div id="EditInforDiv">Add a New Document</div>
        <div class="edit_field">
            <div class="edit_field_label">Name: </div>
            <div class="edit_field_input">
                <asp:TextBox ID="NameTextBox" runat="server"></asp:TextBox>
            </div>
        </div>
        <div class="edit_field">
            <div class="edit_field_label">Select File: </div>
            <div class="edit_field_input"> 
                <asp:FileUpload ID="DocumentFileUpload" runat="server" />
            </div>
        </div>
        <div class="edit_field">
            <div class="edit_field_label">
                <asp:Button ID="SaveButton" runat="server" Text="Save" 
                    onclick="SaveButton_Click" />
            </div>
            <div class="edit_field_input">  
                <asp:Button ID="CancelButton" runat="server" Text="Cancel" 
                    onclick="CancelButton_Click" />
            </div>
        </div>
    </div>     
</asp:Content>
